An object which implements ActionListener
.
Here an application that has two JTextField
s.
The user types into one field
and hits enter.
The application then copies text from that
field to the other.
In the picture, the user typed in "Sherlock" and then hit enter. Here is an applet that does much the same thing. Swing components work in applets as well as applications.
Type your name in the first field then hit enter to see it echoed to the second field. The code for the applet is nearly the same as the code for the application.